<?php
require_once('classes/Databases.class.php');

class Dosen extends Databases{
  protected $sqlFile='com/dosen/bussines/dosen.sql.php';
  public function __construct(){
    parent::__construct();
  }
  function getInfoDosen($username){
    $result=$this->open($this->sqlQueries['get_info_dosen'],array($username,$username));
    return $result;
  }
  function getListMahasiswa($dosenId){
    $result=$this->open($this->sqlQueries['get_list_mahasiswa'],array($dosenId));
    return $result;
  }
  function getPengumuman($dosenId){
    $result=$this->open($this->sqlQueries['get_pengumuman'],array($dosenId));
    return $result;
  }
  function doUpdateDosen($dsnNama,$dsnAlmtRumah,$dsnAlmtkantor,$dsnEmail,$dsnNoTelp,$dsnId){
    $result=$this->execute($this->sqlQueries['do_update_dosen'],array($dsnNama,$dsnAlmtRumah,$dsnAlmtkantor,$dsnEmail,$dsnNoTelp,$dsnId));
    return $result;
  }
  function doAddPegumuman($pengJudul,$pengDosen,$pengIsi){
    $result=$this->execute($this->sqlQueries['do_add_pengumuman'],array($pengJudul,$pengDosen,$pengIsi));
    return $result;
  }
  function doUpdatepengumuman($pengJudul,$pengDosen,$pengIsi,$pengId){
    $result=$this->execute($this->sqlQueries['do_update_pengumunan'],array($pengJudul,$pengDosen,$pengIsi,$pengId));
    return $result;
  }
}
?>
